package com.xx;

import com.xx.Tab.FXBDTabPane;
import com.xx.util.Util;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextArea;
import javafx.scene.image.Image;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

import java.util.Objects;

import static com.xx.util.Util.getResourceUrl;
public class test extends Application {
    @Override
    public void start(Stage stage) throws Exception {
        FXBDTabPane fxbdTabPane = new FXBDTabPane();
        for (int i = 0; i < 10; i++) {
            fxbdTabPane.addTab(new StackPane(new TextArea("这是第"+i+"个FXBDTab")), "FXBDTab"+i,
                    new Image(getResourceUrl("/texture/shell.png")));
        }
        Scene scene = new Scene(fxbdTabPane.getTabPane());
        scene.getStylesheets().add(Objects.requireNonNull(
                Util.class.getResource("/css/FXBD.css")).toExternalForm());
        stage.setScene(scene);
        stage.show();
    }
}
